<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<!DOCTYPE html>
<html>
  <head>
  
<jsp:include page="../meta.jsp"></jsp:include>  
<jsp:include page="../easyUI/easyUI.jsp"></jsp:include>
<script type="text/javascript" charset="UTF-8">

	var dtree;
	
	$(function(){
		
		dtree = $("#deptTree").tree({
			url : '<%=request.getContextPath()%>/deptController.do?tree',
			animate : true,
			lines : !sy.isLessThanIe8(),
			onLoadSuccess : function(node, data) {
				var t = $(this);
				if (data) {
					$(data).each(function(index, d) {
						if (this.state == 'closed') {
							t.tree('expandAll');
						}
					});
				}
			},
			onClick:function(node){
				var home=$("#home",window.parent.document).attr("src");
				$("#home",window.parent.document).attr("src","<%=request.getContextPath()%>/xtgl/user_list.jsp?deptId="+node.id);
			}			
		});
		
	});
</script>
</head>
<body class="easyui-layout" fit="true">
	<div region="center" border="false" style="overflow: hidden;">
		<ul id="deptTree"></ul>
	</div>
</body>
</html>